package it.basilikos.core.service;

import it.basilikos.core.model.Agent;
import it.basilikos.core.model.Sell;
import it.basilikos.core.model.dao.ISellDAO;
import it.basilikos.core.model.dao.impl.SellDAO;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class SellService {

//	@Autowired
	private ISellDAO dao = new SellDAO(); 
	
	public void addSell(Sell s)
	{
		dao.create(s);
	}
	
	public void setDao(ISellDAO dao) {
		this.dao = dao;
	}
	
	public ISellDAO getDao() {
		return dao;
	}
	
	
	@Transactional
	public void foo()
	{
		for(Sell a: dao.findAll())
		{
//			System.out.println(a.get);
		}
	}
}
